
import axios from "axios";
export default{
    namespaced:true,
    state:{
        list:[]
    },
    mutations:{
        changeRentInfo(state,payload){
            state.list = payload
        },
        addRentInfo(state,payload){      
            state.list.push(payload)
        }
    },
    actions:{
        updateRentInfo(context,payload){
            axios.get('http://localhost:8080/data/data.json').then(res=>{
                context.commit('changeRentInfo',res.data)
                
            })
            
        }
    }
}